/** * Autogenerated by Avro * * DO NOT EDIT DIRECTLY */ package com.cloudera.knittingboar.yarn.avro.generated; @SuppressWarnings("all") public class StartupConfiguration extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord { public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"StartupConfiguration\",\"namespace\":\"com.cloudera.knittingboar.yarn.avro.generated\",\"fields\":[{\"name\":\"split\",\"type\":{\"type\":\"record\",\"name\":\"FileSplit\",\"fields\":[{\"name\":\"path\",\"type\":\"string\"},{\"name\":\"offset\",\"type\":\"long\"},{\"name\":\"length\",\"type\":\"long\"}]}},{\"name\":\"iterations\",\"type\":\"int\"},{\"name\":\"batchSize\",\"type\":\"int\"},{\"name\":\"other\",\"type\":[{\"type\":\"map\",\"values\":\"string\"},\"null\"]}]}"); @Deprecated public com.cloudera.knittingboar.yarn.avro.generated.FileSplit split; @Deprecated public int iterations; @Deprecated public int batchSize; @Deprecated public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> other; public org.apache.avro.Schema getSchema() { return SCHEMA$; } // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { case 0: return split; case 1: return iterations; case 2: return batchSize; case 3: return other; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value$) { switch (field$) { case 0: split = (com.cloudera.knittingboar.yarn.avro.generated.FileSplit)value$; break; case 1: iterations = (java.lang.Integer)value$; break; case 2: batchSize = (java.lang.Integer)value$; break; case 3: other = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'split' field. */ public com.cloudera.knittingboar.yarn.avro.generated.FileSplit getSplit() { return split; } /** * Sets the value of the 'split' field. * @param value the value to set. */ public void setSplit(com.cloudera.knittingboar.yarn.avro.generated.FileSplit value) { this.split = value; } /** * Gets the value of the 'iterations' field. */ public java.lang.Integer getIterations() { return iterations; } /** * Sets the value of the 'iterations' field. * @param value the value to set. */ public void setIterations(java.lang.Integer value) { this.iterations = value; } /** * Gets the value of the 'batchSize' field. */ public java.lang.Integer getBatchSize() { return batchSize; } /** * Sets the value of the 'batchSize' field. * @param value the value to set. */ public void setBatchSize(java.lang.Integer value) { this.batchSize = value; } /** * Gets the value of the 'other' field. */ public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getOther() { return other; } /** * Sets the value of the 'other' field. * @param value the value to set. */ public void setOther(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value) { this.other = value; } /** Creates a new StartupConfiguration RecordBuilder */ public static com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder newBuilder() { return new com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder(); } /** Creates a new StartupConfiguration RecordBuilder by copying an existing Builder */ public static com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder newBuilder(com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder other) { return new com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder(other); } /** Creates a new StartupConfiguration RecordBuilder by copying an existing StartupConfiguration instance */ public static com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder newBuilder(com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration other) { return new com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder(other); } /** * RecordBuilder for StartupConfiguration instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<StartupConfiguration> implements org.apache.avro.data.RecordBuilder<StartupConfiguration> { private com.cloudera.knittingboar.yarn.avro.generated.FileSplit split; private int iterations; private int batchSize; private java.util.Map<java.lang.CharSequence,java.lang.CharSequence> other; /** Creates a new Builder */ private Builder() { super(com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.SCHEMA$); } /** Creates a Builder by copying an existing Builder */ private Builder(com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder other) { super(other); } /** Creates a Builder by copying an existing StartupConfiguration instance */ private Builder(com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration other) { super(com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.SCHEMA$); if (isValidValue(fields()[0], other.split)) { this.split = (com.cloudera.knittingboar.yarn.avro.generated.FileSplit) data().deepCopy(fields()[0].schema(), other.split); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.iterations)) { this.iterations = (java.lang.Integer) data().deepCopy(fields()[1].schema(), other.iterations); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.batchSize)) { this.batchSize = (java.lang.Integer) data().deepCopy(fields()[2].schema(), other.batchSize); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.other)) { this.other = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>) data().deepCopy(fields()[3].schema(), other.other); fieldSetFlags()[3] = true; } } /** Gets the value of the 'split' field */ public com.cloudera.knittingboar.yarn.avro.generated.FileSplit getSplit() { return split; } /** Sets the value of the 'split' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder setSplit(com.cloudera.knittingboar.yarn.avro.generated.FileSplit value) { validate(fields()[0], value); this.split = value; fieldSetFlags()[0] = true; return this; } /** Checks whether the 'split' field has been set */ public boolean hasSplit() { return fieldSetFlags()[0]; } /** Clears the value of the 'split' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder clearSplit() { split = null; fieldSetFlags()[0] = false; return this; } /** Gets the value of the 'iterations' field */ public java.lang.Integer getIterations() { return iterations; } /** Sets the value of the 'iterations' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder setIterations(int value) { validate(fields()[1], value); this.iterations = value; fieldSetFlags()[1] = true; return this; } /** Checks whether the 'iterations' field has been set */ public boolean hasIterations() { return fieldSetFlags()[1]; } /** Clears the value of the 'iterations' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder clearIterations() { fieldSetFlags()[1] = false; return this; } /** Gets the value of the 'batchSize' field */ public java.lang.Integer getBatchSize() { return batchSize; } /** Sets the value of the 'batchSize' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder setBatchSize(int value) { validate(fields()[2], value); this.batchSize = value; fieldSetFlags()[2] = true; return this; } /** Checks whether the 'batchSize' field has been set */ public boolean hasBatchSize() { return fieldSetFlags()[2]; } /** Clears the value of the 'batchSize' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder clearBatchSize() { fieldSetFlags()[2] = false; return this; } /** Gets the value of the 'other' field */ public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getOther() { return other; } /** Sets the value of the 'other' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder setOther(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value) { validate(fields()[3], value); this.other = value; fieldSetFlags()[3] = true; return this; } /** Checks whether the 'other' field has been set */ public boolean hasOther() { return fieldSetFlags()[3]; } /** Clears the value of the 'other' field */ public com.cloudera.knittingboar.yarn.avro.generated.StartupConfiguration.Builder clearOther() { other = null; fieldSetFlags()[3] = false; return this; } @Override public StartupConfiguration build() { try { StartupConfiguration record = new StartupConfiguration(); record.split = fieldSetFlags()[0] ? this.split : (com.cloudera.knittingboar.yarn.avro.generated.FileSplit) defaultValue(fields()[0]); record.iterations = fieldSetFlags()[1] ? this.iterations : (java.lang.Integer) defaultValue(fields()[1]); record.batchSize = fieldSetFlags()[2] ? this.batchSize : (java.lang.Integer) defaultValue(fields()[2]); record.other = fieldSetFlags()[3] ? this.other : (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>) defaultValue(fields()[3]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } }